﻿using System;
using System.Configuration;

namespace MDCAdminTool.Configuration
{
	/// <summary>
	/// Configuration element for cluster config
	/// </summary>
	public class ClusterSettingElement : ConfigurationElement
	{
		private const String NameField = "name";
		private const String ConnectionStringField = "connectionString";
		private const String ProviderField = "provider";

		/// <summary>
		/// Friendly display name
		/// </summary>
		[ConfigurationProperty(NameField, IsRequired = true)]
		public String Name
		{
			get { return this[NameField] as String; }
		}

		/// <summary>
		/// Connection strign for the cluster config
		/// </summary>
		[ConfigurationProperty(ConnectionStringField, IsRequired = true)]
		public String ConnectionString
		{
			get { return this[ConnectionStringField] as String; }
		}
		
		/// <summary>
		/// Connection string provider
		/// </summary>
		[ConfigurationProperty(ProviderField, IsRequired = true)]
		public String Provider
		{
			get { return this[ProviderField] as String; }
		}
	}
}